<?
require_once('ValidatorBase.php');

class RequiredValidator extends ValidatorBase {
	public function validate($value) {
		if (
			is_null($value) ||
		 	(is_string($value) && !trim($value)) ||
		 	(is_array($value) && count($value)=== 0)
		 )
			throw new ValidatorException($this,$value);
	}
	protected function doValidate($value) {}
}
